﻿<%@ Control Language="C#" EnableViewState="true" %>
<%@ Register Assembly="Antu.WebControls" Namespace="Antu.WebControls" TagPrefix="CBW" %>
<style type="text/css">
    #ctl00_MainerRegion_ZS_BCFAControl___GridList_Div1
    {
        border-collapse: collapse;
        border: 1px solid #74a4c0;
        background-color: #FFFFFF;
        text-align: center;
        color: #a30101;
    }
</style>

<script type="text/jscript">
     function OpenFileUpload(cqid,cid,pid) 
     {
            window.open('../RCManage/RC_FWFileUpload1.aspx?usetype=1034&pid='+pid+'&cid='+cid+'&cqid=' + cqid+'&ise=0', '文件上传', 'height=600px,width=800px;toolbar =no,menubar=no, scrollbars=yes, resizable=no, location=no, status=yes');
        }
</script>
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="background-image: url(<%= Antu.Core.Components.SiteSettings.DefaultSiteSettings.DefaultThemeFolderMapPath %>images/menuthb.png);
    margin-top: 1px">
    <tr>
        <td valign="middle" height="30">
            <font id="Font1" style="font-size: 14px; font-weight: bold; color: #3E7CC3; float: left;
                color: black; text-indent: 1em;" runat="server">政策法规管理 </font>
        </td>
    </tr>
</table>
<CBW:CustomGridView ShowItemNumber="true" AutoGenerateColumns="false" ID="CustomGridList1"
    runat="server" AllowPaging="true" AllowSorting="false" SkinID="List" CustomSortExpression=""
    HideTextLength="20" ShowCmpAndCancel="False" ShowHideColModel="None" Width="99%"
    CssClass="window_tab_list" CustomGridViewClass="window_tab_list_fst">
    <Columns>
        <asp:BoundField DataField="TITLE" HeaderText="标题" />
        <asp:BoundField DataField="ADDTIME" HeaderText="添加时间" />
        <asp:BoundField DataField="USERname" HeaderText="发布者" />
        <asp:TemplateField HeaderText="操作">
            <ItemTemplate>
            <%
        EluZSProvider.EluZSDataProvider _EluZSDataProvider = (EluZSProvider.EluZSDataProvider)Antu.Core.Services.ProviderService.ProviderServiceMange.GetProvider("EluZSProvider");
        string userid = HttpContext.Current.Session["UserID"].ToString();
        string sql = @"Select * From zs_role Where Id In (Select roleid From zs_user_in_role Where userid = '" + userid + @"')
And (rolename Like '%市征收%' or rolename Like '%超级管理员%')";
        System.Data.DataTable dt = _EluZSDataProvider.GetTable(sql);
        
        if (dt.Rows.Count > 0)
        {
        
            
            
            %>
                <a href='gonggao.aspx?id=<%#Eval("id") %>&action=edit'>
                    <asp:Label ID="Label1" runat="server" Text="查看附件"></asp:Label></a>
                <a href='editgonggao.aspx?id=<%#Eval("id") %>&action=edit'>
                    <asp:Label ID="editgonggao" runat="server" Text="编辑"></asp:Label></a> <a href='gonggao.aspx?id=<%#Eval("id") %>&action=del'
                        onclick='return confirm("确认删除该政策法规?")'>
                        <asp:Label ID="delgonggao" runat="server" Text="删除"></asp:Label></a>
                      <% 
                          }
        else
        {
            %>
                 <a href='gonggao.aspx?id=<%#Eval("id") %>&action=edit'>
                    <asp:Label ID="Label2" runat="server" Text="查看附件"></asp:Label></a>
                      <a href='editgonggao.aspx?id=<%#Eval("id") %>&action=edit'>
                    <asp:Label ID="Label3" runat="server" Text="查看详细"></asp:Label></a> 
            <%
        } %>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</CBW:CustomGridView>
<div style="text-align: center">
    <%
        EluZSProvider.EluZSDataProvider _EluZSDataProvider = (EluZSProvider.EluZSDataProvider)Antu.Core.Services.ProviderService.ProviderServiceMange.GetProvider("EluZSProvider");
        string userid = HttpContext.Current.Session["UserID"].ToString();
       string sql = @"Select * From zs_role Where Id In (Select roleid From zs_user_in_role Where userid = '" + userid + @"')
And (rolename Like '%市征收%' or rolename Like '%超级管理员%')";
        System.Data.DataTable dt = _EluZSDataProvider.GetTable(sql);
        
        if (dt.Rows.Count > 0)
        {
           %>
           <input id="btnAdd" type="button" value="添 加" class="button" onclick="location.href='editgonggao.aspx?id=<%=HttpContext.Current.Request["pid"]%>';" />
    &nbsp;
           
           <%
        }
      
         %>
    </div>
